<template>
  <div class="main">
    <div class="left">
      <studentMainleft></studentMainleft>
    </div>
    <div class="right">
      <template>
        <el-table :data="college" style="width: 30%" max-height="90%" :highlight-current-row="true">
          <el-table-column prop="CollegeName" label="学院名称" width="317"></el-table-column>
        </el-table>
      </template>
      <template v-if="classtable!=null">
        <el-table :data="college" style="width: 30%" max-height="90%" :highlight-current-row="true">
          <el-table-column prop="CollegeName" label="学院名称" width="317"></el-table-column>
        </el-table>
      </template>
    </div>
  </div>
</template>

<script>
import studentMainleft from "@/components/studentMainleft";
export default {
  components: {
    studentMainleft
  },
  data() {
    return {
      college: [],
      classtable: [{
          id:1,
          classId:"2020030903",
          collegeid:1
      },{
          id:1,
          classId:"2020030903",
          collegeid:1
      }]
    };
  },
  created() {
    this.GetAllCollege();
  },
  mounted() {},
  methods: {
    GetAllCollege() {
      this.axios({
        method: "get",
        url: this.$api.GetAllCollege
      }).then(res => {
        console.log(res);
        this.college = res.data.message;
      });
    }
  }
};
</script>

<style scoped>
.main {
  display: flex;
  height: 100%;
}
.right {
  width: 100%;
  background-color: white;
  height: 80%;
  margin-left: 10px;
  padding: 30px 30px 0px 30px;
}
</style>
